import request from '@/utils/request.js'

//addMenu, delMenu, getMenu, listMenu, updateMenu
// 菜单管理
export function addMenu(data) {
    return request({
        url: '/api/menus',
        method: 'post',
        data
    })
}

export function delMenu(data) {
    return request({
        url: `/api/menus/${data}`,
        method: 'delete',
        data
    })
}

export function getMenu(data) {
    return request({
        url: '/api/menus',
        method: 'get',
        params: data
    })
}

export function listMenu(data) {
    return request({
        url: '/api/menus',
        method: 'get',
        params: data
    })
}

export function updateMenu(data) {
    return request({
        url: `/api/menus`,
        method: 'put',
        data
    })
}
